package cn.mrcode.fd.blog.task;

/**
 * 队列中的tag命令操作类
 *
 * @author : zhuqiang
 * @version : V1.0
 * @date : 2016/1/1 13:03
 */
public class TagCommand {
    /** 添加引用 */
    public static final int OPER_TYPE_ADD = 1;
    /** 删除引用 */
    public static final int OPER_TYPE_del = 2;
    private String tagName; //标签名称
    private String articleId; //文章主键id
    private String tagId; //标签id
    private int operType; //操作类型。1：添加：有可能需要新增标签，并更新缓存，2：删除文章对该标签的引用

    public TagCommand(int operType, String articleId, String tagName) {
        this.operType = operType;
        this.articleId = articleId;
        this.tagName = tagName;
    }

    public TagCommand(int operType, String tagId) {
        this.operType = operType;
        this.tagId = tagId;
    }

    public int getOperType() {
        return operType;
    }

    public void setOperType(int operType) {
        this.operType = operType;
    }

    public String getArticleId() {
        return articleId;
    }

    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public String getTagId() {
        return tagId;
    }

    public void setTagId(String tagId) {
        this.tagId = tagId;
    }
}
